package com.jt.www.enums.endorse;

/**
 * 附加校方无过失
 */

public enum AdditionalSchoolEnum {
    YES("是", 1),
    NO("否", 2);

    private String msg;
    private byte code;

    AdditionalSchoolEnum(String msg, int code) {
        this.msg = msg;
        this.code = (byte) code;
    }

    public static byte getCodeByMsg(String msg) {
        for (AdditionalSchoolEnum schoolEnum : AdditionalSchoolEnum.values()) {
            if (schoolEnum.msg.equals(msg)) {
                return schoolEnum.getCode();
            }
        }
        return 0;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public byte getCode() {
        return code;
    }

    public void setCode(byte code) {
        this.code = code;
    }
}
